
package com.probiz.estore.system.service.dwr;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.MessageSource;

import com.probiz.estore.common.model.system.ShippingMethod;
import com.probiz.estore.system.model.ShippingMethodVO;
import com.probiz.estore.system.service.ShippingMethodManager;

public class ShippingMethodDwr {
	protected final transient Log	log				= LogFactory
															.getLog(getClass());
	private ShippingMethodManager	mgr				= null;

	public List getShippingMethods() {
		List rs = new ArrayList();
		for (ShippingMethod shippingMethod : mgr.listAllActive()) {
			ShippingMethodVO vo = new ShippingMethodVO();
			vo.setShippingMethodId(shippingMethod.getShippingMethodId());
			vo.setShippingMethodName(shippingMethod.getShippingMethodName());
			rs.add(vo);
		}
		return rs;
	}

	public void setShippingMethodManager(ShippingMethodManager manager) {
		mgr = manager;
	}

}
